﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Sandbox.Editor.Modes.ModePanels
{
	/// <summary>
	/// Interaction logic for TerrainPanel.xaml
	/// </summary>
	public partial class TerrainPanel : UserControl
	{
		public TerrainPanel()
		{
			InitializeComponent();
			RefereshBrushSizeLabel();
		}

		public TerrainMode Mode
		{
			get;
			set;
		}

		private void SliderBrushSize_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
		{
			RefereshBrushSizeLabel();
			if (Mode != null)
				Mode.OnBrushSizeChanged(e);
		}

		private void RefereshBrushSizeLabel()
		{
			if (LabelBrushSize != null)
				LabelBrushSize.Content = SliderBrushSize.Value.ToString();
		}
	}
}
